package com.jiawa.train.member.controller;

import cn.hutool.json.JSONObject;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * @author zzl
 * @version 1.0
 */
@RestController
@RefreshScope
public class HelloController {
    @Value("${test.nacos}")
    private String testNacos;

    @GetMapping("/hello")
    public String hello() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("error_code", "none");
        jsonObject.put("msg", "hello member" + " " + testNacos);
        System.out.println("测试jenlinks");
        return jsonObject.toString();
//        return "hello member" + " " + testNacos;
    }
}
